package com.zhoug.common3.view.edit;

import android.text.Editable;
import android.text.TextWatcher;

/**
 * 列表中的EditText的数据监听器
 *
 * @Author 35574
 * @Date 2021/12/31
 * @Description
 */
@Deprecated
public abstract class ListTextWatcher implements TextWatcher {
    private static final String TAG = ">>>ListTextWatcher";
    private int position;

    public ListTextWatcher(int position) {
        this.position = position;
    }

    public ListTextWatcher() {
    }

    public void setPosition(int position) {
        this.position = position;
    }

    @Override
    public void beforeTextChanged(CharSequence s, int start, int count, int after) {
    }

    @Override
    public void onTextChanged(CharSequence s, int start, int before, int count) {
    }

    @Override
    public void afterTextChanged(Editable s) {
        afterTextChanged(position, s != null ? s.toString() : null);
    }

    public abstract void afterTextChanged(int position, String text);


}
